package s02;

/**
 * @ClassName ThreadDemo02
 * @Description TODO
 * @Author Li
 * @Date 2022/8/8 9:52
 * @ModifyDate 2022/8/8 9:52
 * @Version 1.0
 */
public class ThreadDemo02 {
    public static void main(String[] args) {
        // 创建自定义对象，线程任务对象
        MyRunnable myRunnable = new MyRunnable();
        // 创建线程对象
        Thread thread = new Thread(myRunnable, "rThread");
        thread.start();
        for (int i = 0; i < 20; i++) {
            System.out.println("mainThread -> " + i);
        }
    }
}
